//using System;
//using System.Linq.Expressions;
//using System.Windows;
//using FluentSilverlight.Utility.Reflection;

//namespace FluentSilverlight.Expressions
//{
//    public abstract class BoundExpression<THIS, TModel> : FrameworkElementExpression<THIS, TModel, FrameworkElement>
//        where THIS : BoundExpression<THIS, TModel>
//        where TModel : class
//    {
//        private readonly object rawValue;
//        protected string validators;
//        protected int maxStringLength;
//        protected Accessor expressionAccessor;

//        protected BoundExpression(string name, object rawValue) : base(name)
//        {
//            this.rawValue = rawValue;
//        }

//        protected BoundExpression(TModel model, Expression<Func<TModel, object>> expression)
//        {
//            expressionAccessor = Utility.Reflection.ReflectionHelper.GetAccessor(expression);
//            if (model != null)
//            {
//                // Naive for the moment
//                rawValue = expressionAccessor.GetValue(model);
//            }

//            Name(expressionAccessor.Name);
//        }

//        protected object RawValue
//        {
//            get { return rawValue; }
//        }

//        protected virtual object GetValue()
//        {
//            return rawValue;
//        }
//    }
//}